package com.wanmait.zaisousuo.controller;

import com.wanmait.zaisousuo.pojo.Userinfo;
import com.wanmait.zaisousuo.service.UserinfoService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

@Controller
@RequestMapping("/backstage")
public class UserinfoController {
    @Resource
    private UserinfoService userinfoService;

    @RequestMapping({"question/userinfoShow","answer/userinfoShow"})
    public void show(Integer userinfoId, Model model){
        Userinfo userinfo = userinfoService.findById(userinfoId);
        model.addAttribute(userinfo);
    }

/*    @RequestMapping("/company/approval")
    @ResponseBody
    public void companyApproval(){


    }*/


}
